#define  _CRT_SECURE_NO_WARNINGS 1

#include <iostream>
#include <string>

using namespace std;

void TestString1()
{
	/*string str1 = "Hello world";

	cout << str1.size() << endl;
	cout << str1.length() << endl;

	cout << str1.max_size() << endl;
	cout << string::npos << endl;

	cout << str1 << endl;
	str1.resize(5);
	cout << str1 << endl;
	str1.resize(15, '%');
	cout << str1 << endl;

	cout << str1.capacity() << endl;
	cout << str1.size() << endl;
	str1.clear();
	cout << str1.capacity() << endl;
	cout << str1.size() << endl;

	cout << str1.empty() << endl;
	str1 = "Hello world~";
	cout << str1.empty() << endl;

	cout << endl<< str1.capacity() << endl;
	cout << str1.size() << endl;
	str1.shrink_to_fit();
	cout << str1.capacity() << endl;
	cout << str1.size() << endl;*/

	string str2(100, 'k');

	cout << str2 << endl;

	str2.resize(10);
	cout << str2 << endl;

	cout << str2.capacity() << endl;
	str2.shrink_to_fit();
	cout << str2.capacity() << endl;
}

int main()
{
	TestString1();

	return 0;
}
